<template>
  <div>
    <div class="pageTop">
      <el-tabs v-model="clickType" @tab-click="clickTop">
        <el-tab-pane name="0" label="通用设置"></el-tab-pane>
        <el-tab-pane name="1" label="发券详情"></el-tab-pane>
        <el-tab-pane name="2" label="弹窗设置"></el-tab-pane>
        <el-tab-pane name="3" label="回收订单"></el-tab-pane>
      </el-tabs>
      <!-- <div
        class="pageTop__botton"
        @click="clickTop(0)"
        :style="{'backgroundColor': clickType===0 ? '#2E99F3' : '#EAF5FE', 'color':clickType === 0 ? 'white' : '#2E99F3' }"
      >通用设置</div>
      <div
        class="pageTop__botton"
        @click="clickTop(1)"
        :style="{'backgroundColor': clickType===1 ? '#2E99F3' : '#EAF5FE', 'color':clickType === 1 ? 'white' : '#2E99F3' }"
      >发券详情</div>
      <div
        class="pageTop__botton"
        @click="clickTop(2)"
        :style="{'backgroundColor': clickType===2 ? '#2E99F3' : '#EAF5FE', 'color':clickType===2 ? 'white' : '#2E99F3' }"
      >弹窗设置</div>
      <div
        class="pageTop__botton"
        @click="clickTop(3)"
        :style="{'backgroundColor': clickType===3 ? '#2E99F3' : '#EAF5FE', 'color':clickType===3 ? 'white' : '#2E99F3' }"
      >回收订单</div> -->
    </div>
    <NormalSetting v-if="clickType==='0'" />
    <DialogSetting v-if="clickType==='2'" />
    <OrderSetting v-if="clickType==='3'" />
  </div>
</template>

<script lang="ts">
import { Vue, Component } from "vue-property-decorator";
import NormalSetting from "./common/NormalSetting.vue";
import DialogSetting from "./common/DialogSetting.vue";
import OrderSetting from "./common/OrderSetting.vue";

@Component({
  components: {
    NormalSetting,
    DialogSetting,
    OrderSetting,
  },
})
export default class ManageIndex extends Vue {
  name = "recoveryIndex";

  clickType = "0";

  mounted() {
    this.init();
  }

  clickTop(e) {
    console.log(e)
    // this.clickType = e;
    if (this.clickType === "1") {
      this.$router.push({ name: "CouponIndex" });
    }
  }

  /**
   * 初始化信息
   */
  init() {
    console.log("init");
  }
}
</script>

<style lang="scss" scoped>
@include b(pageTop) {
  display: flex;
  padding-bottom: 20px;
  height: 50px;
  align-items: center;

  @include e(botton) {
    padding: 10px 20px;
    border-radius: 50px;
    font-size: 13px;
    font-weight: bold;
    margin-right: 20px;
    cursor: pointer;
  }
}
</style>
